<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>GEE遥感影像监督分类 | 洛沐の人间客栈</title><meta name="keywords" content="遥感影像分类"><meta name="author" content="洛沐,guojiaxiang0820@gmail.com"><meta name="copyright" content="洛沐"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="美好的四月已经结束，五月在悄悄拉开帷幕，夏季承载着毕业生的所有期望悄悄展露头脚，毕业设计将成为她最美的画卷……我们之所以努力地推动科技的进步，就是希望每个人都能活得更有尊严，这才应是科研者和技术人所应有的本心。">
<meta property="og:type" content="article">
<meta property="og:title" content="GEE遥感影像监督分类">
<meta property="og:url" content="https://www.guojxblog.cn/archives/1abb07a6.html">
<meta property="og:site_name" content="洛沐の人间客栈">
<meta property="og:description" content="美好的四月已经结束，五月在悄悄拉开帷幕，夏季承载着毕业生的所有期望悄悄展露头脚，毕业设计将成为她最美的画卷……我们之所以努力地推动科技的进步，就是希望每个人都能活得更有尊严，这才应是科研者和技术人所应有的本心。">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/bg_beauty.jpg">
<meta property="article:published_time" content="2022-05-06T10:58:02.000Z">
<meta property="article:modified_time" content="2023-03-10T15:15:57.315Z">
<meta property="article:author" content="洛沐">
<meta property="article:tag" content="遥感影像分类">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/bg_beauty.jpg"><link rel="shortcut icon" href="https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/RS_icon.jpg"><link rel="canonical" href="https://www.guojxblog.cn/archives/1abb07a6"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><meta name="baidu-site-verification" content="code-zGPrfnFp7y"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: {"defaultEncoding":2,"translateDelay":0,"msgToTraditionalChinese":"繁","msgToSimplifiedChinese":"簡"},
  noticeOutdate: {"limitDay":180,"position":"top","messagePrev":"此文中创建于","messageNext":"天之前，请以最新文章为准！"},
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":500},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: true
  },
  runtime: '',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: {"limitCount":50,"languages":{"author":"作者: 洛沐","link":"链接: ","source":"来源: 洛沐の人间客栈","info":"著作权归作者所有。商业转载请联系作者获得授权，非商业转载请注明出处。"}},
  lightbox: 'mediumZoom',
  Snackbar: {"chs_to_cht":"你已切换为繁体","cht_to_chs":"你已切换为简体","day_to_night":"你已切换为深色模式","night_to_day":"你已切换为浅色模式","bgLight":"#49b1f5","bgDark":"#1f1f1f","position":"bottom-left"},
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery@2/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery@2/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: true,
  islazyload: false,
  isAnchor: true
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'GEE遥感影像监督分类',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2023-03-10 23:15:57'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          const now = new Date()
          const hour = now.getHours()
          const isNight = hour <= 6 || hour >= 18
          if (t === undefined) isNight ? activateDarkMode() : activateLightMode()
          else if (t === 'light') activateLightMode()
          else activateDarkMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><link rel="stylesheet" href="/css/style.css"><link rel="stylesheet" href="/css/iconfont.css"><link rel="stylesheet" href="/css/font-awesome.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/sviptzk/StaticFile_HEXO@latest/butterfly/css/macblack.css"><script src="/live2d-widget/autoload.js"></script><meta name="generator" content="Hexo 6.1.0"></head><body><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/loading3.gif" data-original="https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/touxiang.jpeg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data is-center"><div class="data-item"><a href="/archives/"><div class="headline">文章</div><div class="length-num">29</div></a></div><div class="data-item"><a href="/tags/"><div class="headline">标签</div><div class="length-num">18</div></a></div><div class="data-item"><a href="/categories/"><div class="headline">分类</div><div class="length-num">7</div></a></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page group hide" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fa fa-graduation-cap"></i><span> 文章</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/archives/"><i class="fa-fw fa fa-folder-open"></i><span> 归档</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fa fa-archive"></i><span> 分类</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fa fa-tags"></i><span> 标签</span></a></li></ul></div><div class="menus_item"><a class="site-page group hide" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fa-solid fa-heart-pulse"></i><span> 生活</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/books/"><i class="fa-fw fas fa-book-reader"></i><span> 读书</span></a></li><li><a class="site-page child" href="/photos/"><i class="fa-fw fa fa-camera-retro"></i><span> 相册</span></a></li><li><a class="site-page child" href="/music/"><i class="fa-fw fa fa-music"></i><span> 音乐</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> 影视</span></a></li></ul></div><div class="menus_item"><a class="site-page group hide" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fa-solid fa-keyboard"></i><span> 动态</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/comment/"><i class="fa-fw fa fa-paper-plane"></i><span> 留言</span></a></li><li><a class="site-page child" href="/notes/"><i class="fa-fw fas fa-feather-alt"></i><span> 随笔</span></a></li><li><a class="site-page child" href="/ideas/"><i class="fa-fw fa-solid fa-lightbulb"></i><span> 妙想</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fa fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/bg_beauty.jpg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">洛沐の人间客栈</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page group hide" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fa fa-graduation-cap"></i><span> 文章</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/archives/"><i class="fa-fw fa fa-folder-open"></i><span> 归档</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fa fa-archive"></i><span> 分类</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fa fa-tags"></i><span> 标签</span></a></li></ul></div><div class="menus_item"><a class="site-page group hide" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fa-solid fa-heart-pulse"></i><span> 生活</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/books/"><i class="fa-fw fas fa-book-reader"></i><span> 读书</span></a></li><li><a class="site-page child" href="/photos/"><i class="fa-fw fa fa-camera-retro"></i><span> 相册</span></a></li><li><a class="site-page child" href="/music/"><i class="fa-fw fa fa-music"></i><span> 音乐</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> 影视</span></a></li></ul></div><div class="menus_item"><a class="site-page group hide" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fa-solid fa-keyboard"></i><span> 动态</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/comment/"><i class="fa-fw fa fa-paper-plane"></i><span> 留言</span></a></li><li><a class="site-page child" href="/notes/"><i class="fa-fw fas fa-feather-alt"></i><span> 随笔</span></a></li><li><a class="site-page child" href="/ideas/"><i class="fa-fw fa-solid fa-lightbulb"></i><span> 妙想</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fa fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">GEE遥感影像监督分类</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2022-05-06T10:58:02.000Z" title="发表于 2022-05-06 18:58:02">2022-05-06</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2023-03-10T15:15:57.315Z" title="更新于 2023-03-10 23:15:57">2023-03-10</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/%E9%81%A5%E6%84%9F%E4%B8%8E%E5%A4%A7%E6%95%B0%E6%8D%AE/">遥感与大数据</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">4.5k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>20分钟</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="GEE遥感影像监督分类"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h1 id="引言"><a href="#引言" class="headerlink" title="引言"></a>引言</h1><h2 id="写本文的初衷"><a href="#写本文的初衷" class="headerlink" title="写本文的初衷"></a>写本文的初衷</h2><p>美好的四月已经结束，五月在悄悄拉开帷幕，夏季承载着毕业生的所有期望悄悄展露头脚，毕业设计将成为她最美的画卷。前几天看到一位师妹做毕设时，用线下软件处理数据时的万般无奈与纠结，对于这种线下下载式的遥感处理方法，在GEE（Google Earth Engine, 谷歌地球引擎）出现之后便以逐步被很多科研工作者所弃用抑或是被淘汰，也许是这种云端处理模式之于遥感大数据而言，就本该是绝配。大数据时代的到来，也预示着这种线下处理模式的凋零，5G与互联网技术的进步正使得遥感数据云端处理成为可能。</p>
<h2 id="解决了什么问题"><a href="#解决了什么问题" class="headerlink" title="解决了什么问题"></a>解决了什么问题</h2><p>本文是一个技术博客，主要解决某线下处理软件不中用的问题。这种依赖于个人电脑配置以及付费软件版本功能的遥感大数据处理方式，本就应该逐步被云端处理所替代。当然，在此声明，并非针对某E姓软件，此软件在线下处理遥感数据的能力至今无软件可以匹敌，主要还是由于其对遥感数据具有强大的解析能力，但很无奈随着软件的升级，并非所有电脑都可以适配，因此云端处理数据就显得尤为重要。</p>
<h2 id="GEE的优势"><a href="#GEE的优势" class="headerlink" title="GEE的优势"></a>GEE的优势</h2><p>GEE（Google Earth Engine），第一次听到这个美好的名字时还是在读大二，记得那时候有一位不近学长强烈推荐使用GEE进行数据处理。然而当时年少轻狂，不知学长的苦心。坚持用某种E姓线下处理软件处理遥感大数据，要知道一景高分辨率遥感数据的数据量就高达1个G，是不是还有好几个G的，当时的电脑配置处理速度一个上午也处理不了几景。之后听说该软件加入了批处理功能，只要在刚开始设置好处理流程和相应的参数，就能一键三连，甚至一键好多连。但是，软件设计者却没有考虑到，一旦进入了这种批处理模式，电脑不能多线程工作，依然需要等一上午，才能把流程走完，才能处理之后的数据。不得不说这是一种巨大的进步呀！解放了人的双手，本就是科技革命的本质目的呢！</p>
<p>GEE具有如下优势：</p>
<p>（1）GEE可以实现远程云端处理，提供非常巨大的服务器，不需要担心个人电脑配置问题；</p>
<p>（2）GEE可以进行多线程处理遥感数据，可以同时开多个网页端，进行编程计算，效率大大提提升；</p>
<p>（3）GEE利用Javascript动态语言，灵活多变，且简单易学；</p>
<p>（4）GEE中集成了大量遥感数据处理模型与函数API，可以随时调用，不用自行编写；</p>
<p>（5）GEE还提供了Python接口，利用Python脚本就可以实现相应功能；</p>
<p>……</p>
<h1 id="数据源与预处理"><a href="#数据源与预处理" class="headerlink" title="数据源与预处理"></a>数据源与预处理</h1><h2 id="GEE-SR数据集介绍"><a href="#GEE-SR数据集介绍" class="headerlink" title="GEE SR数据集介绍"></a>GEE SR数据集介绍</h2><p>SR数据集是某些卫星传感器的大气校正表面反射率以及其他经过与处理之后的的卫星遥感数据的集合。这些图像包含可见光、近红外（VNIR）波段、短波红外（SWIR）波段被处理成正交的表面反射率，以及热红外（TIR）波段被处理成正交的亮度温度的数据。这些数据已经进行了大气校正，包括用CFMASK制作的云、影、水和雪掩码，以及每个像素的饱和掩码。收集的数据条被打包成重叠的 “场景”，使用标准化的参考网格，覆盖大约170公里x183公里。另见美国地质调查局关于SR质量保证带的网页。SR只能为处理到L1TP级别的Landsat资产制作。</p>
<p>——来自数据提供者</p>
<blockquote>
<p>参考:</p>
<p><a target="_blank" rel="noopener external nofollow noreferrer" href="https://blog.csdn.net/qq_31988139/article/details/120402644">Google Earth Engine ——LANDSAT8_SR数据集</a></p>
</blockquote>
<h2 id="研究区域"><a href="#研究区域" class="headerlink" title="研究区域"></a>研究区域</h2><p>本文就选择青岛地区作为研究区进行数据处理。</p>
<p><img src="https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/loading3.gif" data-original="https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/GEE%E9%81%A5%E6%84%9F%E5%BD%B1%E5%83%8F%E7%9B%91%E7%9D%A3%E5%88%86%E7%B1%BB/S2Qingdao.png" alt="青岛地区Sentinel-2数据"></p>
<h2 id="哨兵-2号数据"><a href="#哨兵-2号数据" class="headerlink" title="哨兵-2号数据"></a>哨兵-2号数据</h2><p>哨兵-2号卫星，又名Sentinel-2，是欧空局于2017年发射，搭载高分辨率多光谱卫星传感器的光学遥感卫星。空间分辨率可达10米。主要用于土地利用，资源探测，自然灾害监测以及定量反演的一种资源卫星。哨兵2A与2B两颗由空中巴士国防航天等多个产业团队共同研发及制造，两架卫星的设计大致相同，且绕行同一太阳同步轨道，惟彼此所在的位置相距180度。</p>
<p>哨兵2号将可在多方面提供关于地球陆地地表与海岸区域变化的应用。该任务主要提供农业与森林管理相关影像资料，并可协助管理食品安全。卫星影像可用以测定多种植生指数，例如植物叶面积、叶绿素与含水量指数。这对地球上的植物量与农作物收获量推估特别重要。哨兵2号监测植物生长的同时，也可以在影像中表示地表覆盖物变迁与监测全世界森林。它也可提供湖泊与沿海污染状况影像。卫星还可拍摄洪水、火山爆发与山崩等天灾影像进行测绘，以协助人道救援。哨兵2号影像应用的例子如下：</p>
<ul>
<li>针对环境监测观察土地利用变化。</li>
<li>农业应用，例如作物监控与管理，协助粮食安全。</li>
<li>详细的植被与森林监测，与相关参数制作（例如叶面积指数、叶绿素含量、碳量估计）</li>
<li>观测沿海地区（海洋环境监测、沿海地区测绘）</li>
<li>内陆水域监测</li>
<li>冰川监测、海冰分布测绘、积雪监测</li>
<li>洪水区测绘与管理（风险分析、损害评估、洪水期间灾害管控）</li>
</ul>
<p>哨兵计画的卫星观测网提供了简单的方式监测与分析基于哨兵2号拍摄影像的地表变迁。</p>
<p>——维基百科</p>
<p>以下是其波段设计：</p>
<p><img src="https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/loading3.gif" data-original="https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/GEE%E9%81%A5%E6%84%9F%E5%BD%B1%E5%83%8F%E7%9B%91%E7%9D%A3%E5%88%86%E7%B1%BB/Sentinel-2Bands.png" alt="哨兵-2号波段设计（图源于维基百科）"></p>
<h1 id="方法原理"><a href="#方法原理" class="headerlink" title="方法原理"></a>方法原理</h1><h2 id="辐射校正"><a href="#辐射校正" class="headerlink" title="辐射校正"></a>辐射校正</h2><p>辐射校正包括辐射定标和大气校正，属于遥感数据预处理的内容。GEE中的SR数据集已经做了遥感数据预处理，所以在此只是利用FMASK进行云检测与去除即可（详见代码）。</p>
<h2 id="地理校正"><a href="#地理校正" class="headerlink" title="地理校正"></a>地理校正</h2><p>数据集已经做过几何校正与几何精校正。</p>
<h2 id="机器学习——随机森林算法模型"><a href="#机器学习——随机森林算法模型" class="headerlink" title="机器学习——随机森林算法模型"></a>机器学习——随机森林算法模型</h2><p>随机森林模型可以理解为一种用多个决策树组成的随机数的投票机制进行模式识别的过程，属于机器学习中监督学习的一种。</p>
<h2 id="其他模型"><a href="#其他模型" class="headerlink" title="其他模型"></a>其他模型</h2><p>SVM（支持向量机）</p>
<p>决策树……</p>
<h1 id="GEE中的分类器与分类方法详解（代码与分析方法）"><a href="#GEE中的分类器与分类方法详解（代码与分析方法）" class="headerlink" title="GEE中的分类器与分类方法详解（代码与分析方法）"></a>GEE中的分类器与分类方法详解（代码与分析方法）</h1><h2 id="JavaScript基础"><a href="#JavaScript基础" class="headerlink" title="JavaScript基础"></a>JavaScript基础</h2><h2 id="代码与方法详解"><a href="#代码与方法详解" class="headerlink" title="代码与方法详解"></a>代码与方法详解</h2><p>样本选取（分类依据）：</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br><span class="line">262</span><br><span class="line">263</span><br><span class="line">264</span><br><span class="line">265</span><br><span class="line">266</span><br><span class="line">267</span><br><span class="line">268</span><br><span class="line">269</span><br><span class="line">270</span><br><span class="line">271</span><br><span class="line">272</span><br><span class="line">273</span><br><span class="line">274</span><br><span class="line">275</span><br><span class="line">276</span><br><span class="line">277</span><br><span class="line">278</span><br><span class="line">279</span><br><span class="line">280</span><br><span class="line">281</span><br><span class="line">282</span><br><span class="line">283</span><br><span class="line">284</span><br><span class="line">285</span><br><span class="line">286</span><br><span class="line">287</span><br><span class="line">288</span><br><span class="line">289</span><br><span class="line">290</span><br><span class="line">291</span><br><span class="line">292</span><br><span class="line">293</span><br><span class="line">294</span><br><span class="line">295</span><br><span class="line">296</span><br><span class="line">297</span><br><span class="line">298</span><br><span class="line">299</span><br><span class="line">300</span><br><span class="line">301</span><br><span class="line">302</span><br><span class="line">303</span><br><span class="line">304</span><br><span class="line">305</span><br><span class="line">306</span><br><span class="line">307</span><br><span class="line">308</span><br><span class="line">309</span><br><span class="line">310</span><br><span class="line">311</span><br><span class="line">312</span><br><span class="line">313</span><br><span class="line">314</span><br><span class="line">315</span><br><span class="line">316</span><br><span class="line">317</span><br><span class="line">318</span><br><span class="line">319</span><br><span class="line">320</span><br><span class="line">321</span><br><span class="line">322</span><br><span class="line">323</span><br><span class="line">324</span><br><span class="line">325</span><br><span class="line">326</span><br><span class="line">327</span><br><span class="line">328</span><br><span class="line">329</span><br><span class="line">330</span><br><span class="line">331</span><br><span class="line">332</span><br><span class="line">333</span><br><span class="line">334</span><br><span class="line">335</span><br><span class="line">336</span><br><span class="line">337</span><br><span class="line">338</span><br><span class="line">339</span><br><span class="line">340</span><br><span class="line">341</span><br><span class="line">342</span><br><span class="line">343</span><br><span class="line">344</span><br><span class="line">345</span><br><span class="line">346</span><br><span class="line">347</span><br><span class="line">348</span><br><span class="line">349</span><br><span class="line">350</span><br><span class="line">351</span><br><span class="line">352</span><br><span class="line">353</span><br><span class="line">354</span><br><span class="line">355</span><br><span class="line">356</span><br><span class="line">357</span><br><span class="line">358</span><br><span class="line">359</span><br><span class="line">360</span><br><span class="line">361</span><br><span class="line">362</span><br><span class="line">363</span><br><span class="line">364</span><br><span class="line">365</span><br><span class="line">366</span><br><span class="line">367</span><br><span class="line">368</span><br><span class="line">369</span><br><span class="line">370</span><br><span class="line">371</span><br><span class="line">372</span><br><span class="line">373</span><br><span class="line">374</span><br><span class="line">375</span><br><span class="line">376</span><br><span class="line">377</span><br><span class="line">378</span><br><span class="line">379</span><br><span class="line">380</span><br><span class="line">381</span><br><span class="line">382</span><br><span class="line">383</span><br><span class="line">384</span><br><span class="line">385</span><br><span class="line">386</span><br><span class="line">387</span><br><span class="line">388</span><br><span class="line">389</span><br><span class="line">390</span><br><span class="line">391</span><br><span class="line">392</span><br><span class="line">393</span><br><span class="line">394</span><br><span class="line">395</span><br><span class="line">396</span><br><span class="line">397</span><br><span class="line">398</span><br><span class="line">399</span><br><span class="line">400</span><br><span class="line">401</span><br><span class="line">402</span><br><span class="line">403</span><br><span class="line">404</span><br><span class="line">405</span><br><span class="line">406</span><br><span class="line">407</span><br><span class="line">408</span><br><span class="line">409</span><br><span class="line">410</span><br><span class="line">411</span><br><span class="line">412</span><br><span class="line">413</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> water = <span class="comment">/* color: #1238d6 */</span>ee.<span class="title class_">FeatureCollection</span>(</span><br><span class="line">        [ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.20902134280091</span>, <span class="number">36.366615266547605</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">1</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;0&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.22859073977357</span>, <span class="number">36.423268311469755</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">1</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;1&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.22691705516193</span>, <span class="number">36.36163695583249</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">1</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;2&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.42535760691975</span>, <span class="number">36.46276088800295</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">1</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;3&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">119.93889828164347</span>, <span class="number">36.008296081362744</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">1</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;4&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.01065273720988</span>, <span class="number">36.01440578843647</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">1</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;5&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.04635830361613</span>, <span class="number">36.01176756392882</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">1</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;6&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.43683930490783</span>, <span class="number">36.95302971145465</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">1</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;7&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.44782563303283</span>, <span class="number">36.94424971643165</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">1</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;8&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.14089509104065</span>, <span class="number">36.86188806223697</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">1</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;9&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.23496552561096</span>, <span class="number">36.96674642762685</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">1</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;10&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">119.76976179656316</span>, <span class="number">35.76148094110215</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">1</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;11&quot;</span></span><br><span class="line">            &#125;)]),</span><br><span class="line">    forest = <span class="comment">/* color: #0c6c0d */</span>ee.<span class="title class_">FeatureCollection</span>(</span><br><span class="line">        [ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">119.94339981050962</span>, <span class="number">35.81958333441058</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">2</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;0&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">119.94558849306577</span>, <span class="number">35.82010313531279</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">2</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;1&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">119.82961706577312</span>, <span class="number">35.87820141012196</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">2</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;2&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">119.82956878601085</span>, <span class="number">35.878805584997174</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">2</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;3&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.0430490811918</span>, <span class="number">35.987221588668284</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">2</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;4&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.03816209636666</span>, <span class="number">35.98757317717099</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">2</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;5&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.04118066355771</span>, <span class="number">36.97603292697505</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">2</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;6&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.03922801539487</span>, <span class="number">36.97607149704851</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">2</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;7&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">119.99538412831197</span>, <span class="number">35.78700580416246</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">2</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;8&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">119.99416640541921</span>, <span class="number">35.78794574354011</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">2</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;9&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.60185426463654</span>, <span class="number">36.199152594317674</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">2</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;10&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.60916060199311</span>, <span class="number">36.198719701190235</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">2</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;11&quot;</span></span><br><span class="line">            &#125;)]),</span><br><span class="line">    city = <span class="comment">/* color: #d2b762 */</span>ee.<span class="title class_">FeatureCollection</span>(</span><br><span class="line">        [ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.41650156503648</span>, <span class="number">36.129044116121754</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">3</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;0&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.41429142480821</span>, <span class="number">36.129650704761204</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">3</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;1&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.41075090890855</span>, <span class="number">36.13015330322532</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">3</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;2&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.40731768136949</span>, <span class="number">36.13140111998</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">3</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;3&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.40678123956651</span>, <span class="number">36.13245828253948</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">3</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;4&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.40596584802599</span>, <span class="number">36.13261425613783</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">3</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;5&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.41094402795763</span>, <span class="number">36.13259692575331</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">3</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;6&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.43519119745226</span>, <span class="number">36.134035334643784</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">3</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;7&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.3765044642064</span>, <span class="number">36.13712869094811</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">3</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;8&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.36266426568956</span>, <span class="number">36.136175568950556</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">3</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;9&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.41381935602159</span>, <span class="number">36.13368006742981</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">3</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;10&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.42368131510972</span>, <span class="number">36.36322623928067</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">3</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;11&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.42664247386216</span>, <span class="number">36.36450489817577</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">3</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;12&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.42889552943467</span>, <span class="number">36.36379645462681</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">3</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;13&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.43430286280869</span>, <span class="number">36.360668858459796</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">3</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;14&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.1530537247987</span>, <span class="number">36.000872283292146</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">3</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;15&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.1313628962036</span>, <span class="number">35.99522397160657</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">3</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;16&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.00107276402414</span>, <span class="number">35.86535928375581</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">3</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;17&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.00620559321929</span>, <span class="number">36.7583440992046</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">3</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;18&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">119.95093062984039</span>, <span class="number">36.77374584237985</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">3</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;19&quot;</span></span><br><span class="line">            &#125;)]),</span><br><span class="line">    cropland = <span class="comment">/* color: #20ff0b */</span>ee.<span class="title class_">FeatureCollection</span>(</span><br><span class="line">        [ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.11102335818197</span>, <span class="number">36.619067818509706</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">4</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;0&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.13436930544759</span>, <span class="number">36.62733409634618</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">4</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;1&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">119.81873343673892</span>, <span class="number">36.69381851197602</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">4</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;2&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">119.86147711960025</span>, <span class="number">36.688174860750884</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">4</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;3&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.33817687859451</span>, <span class="number">36.58809087721563</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">4</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;4&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.3939523804311</span>, <span class="number">36.61929112620923</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">4</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;5&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.41438008428852</span>, <span class="number">36.620737784630805</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">4</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;6&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.46562100530903</span>, <span class="number">36.60454744022903</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">4</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;7&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">119.76090298257323</span>, <span class="number">36.09103938085209</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">4</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;8&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">119.7595296915576</span>, <span class="number">36.08656564731201</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">4</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;9&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">119.78566513619872</span>, <span class="number">36.099257902091296</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">4</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;10&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">119.65844860243544</span>, <span class="number">35.70823232349895</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">4</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;11&quot;</span></span><br><span class="line">            &#125;)]),</span><br><span class="line">    grassland = <span class="comment">/* color: #abff46 */</span>ee.<span class="title class_">FeatureCollection</span>(</span><br><span class="line">        [ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">119.98312553510928</span>, <span class="number">36.764253556519925</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">5</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;0&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">119.96921023474002</span>, <span class="number">36.764562973144855</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">5</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;1&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">119.96060296055511</span>, <span class="number">36.76853351705692</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">5</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;2&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">119.9530015802069</span>, <span class="number">36.768331547359665</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">5</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;3&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">119.99397598302684</span>, <span class="number">36.77292546571223</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">5</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;4&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">119.99547571008006</span>, <span class="number">36.772754148239926</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">5</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;5&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.40651565455876</span>, <span class="number">36.33991890340855</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">5</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;6&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.4503965940424</span>, <span class="number">36.33621129204126</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">5</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;7&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.54005730875981</span>, <span class="number">36.354946496140364</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">5</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;8&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.52396457788124</span>, <span class="number">36.35739759356269</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">5</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;9&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">120.39922041742305</span>, <span class="number">36.18777775513172</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">5</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;10&quot;</span></span><br><span class="line">            &#125;),</span><br><span class="line">        ee.<span class="title class_">Feature</span>(</span><br><span class="line">            ee.<span class="property">Geometry</span>.<span class="title class_">Point</span>([<span class="number">119.93996242142477</span>, <span class="number">35.882724414600965</span>]),</span><br><span class="line">            &#123;</span><br><span class="line">              <span class="string">&quot;landcover&quot;</span>: <span class="number">5</span>,</span><br><span class="line">              <span class="string">&quot;system:index&quot;</span>: <span class="string">&quot;11&quot;</span></span><br><span class="line">            &#125;)]);</span><br></pre></td></tr></table></figure>



<p>算法详解：</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">//选择需要裁剪的矢量数据 </span></span><br><span class="line"><span class="keyword">var</span> aoi = ee.<span class="title class_">FeatureCollection</span>(<span class="string">&quot;users/guojiaxiang0820/Qingdao&quot;</span>);</span><br><span class="line"><span class="comment">//加载矢量边框，以便于在边界内选取样本点</span></span><br><span class="line"><span class="keyword">var</span> empty = ee.<span class="title class_">Image</span>().<span class="title function_">toByte</span>();</span><br><span class="line"><span class="keyword">var</span> outline = empty.<span class="title function_">paint</span>(&#123;</span><br><span class="line"> <span class="attr">featureCollection</span>:aoi, <span class="comment">// 行政边界命名为fc</span></span><br><span class="line"> <span class="attr">color</span>:<span class="number">0</span>, <span class="comment">//颜色透明</span></span><br><span class="line"> <span class="attr">width</span>:<span class="number">3</span> <span class="comment">//边界宽度</span></span><br><span class="line">&#125;);</span><br><span class="line"><span class="title class_">Map</span>.<span class="title function_">addLayer</span>(outline, &#123;<span class="attr">palette</span>: <span class="string">&quot;ff0000&quot;</span>&#125;, <span class="string">&quot;outline&quot;</span>);</span><br><span class="line"><span class="comment">//Function to mask the clouds in Sentinel-2</span></span><br><span class="line"><span class="keyword">function</span> <span class="title function_">maskS2clouds</span>(<span class="params">image</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> qa = image.<span class="title function_">select</span>(<span class="string">&#x27;QA60&#x27;</span>);</span><br><span class="line"></span><br><span class="line">  <span class="comment">// Bits 10 and 11 are clouds and cirrus, respectively.</span></span><br><span class="line">  <span class="keyword">var</span> cloudBitMask = <span class="number">1</span> &lt;&lt; <span class="number">10</span>;</span><br><span class="line">  <span class="keyword">var</span> cirrusBitMask = <span class="number">1</span> &lt;&lt; <span class="number">11</span>;</span><br><span class="line"></span><br><span class="line">  <span class="comment">// Both flags should be set to zero, indicating clear conditions.</span></span><br><span class="line">  <span class="keyword">var</span> mask = qa.<span class="title function_">bitwiseAnd</span>(cloudBitMask).<span class="title function_">eq</span>(<span class="number">0</span>)</span><br><span class="line">      .<span class="title function_">and</span>(qa.<span class="title function_">bitwiseAnd</span>(cirrusBitMask).<span class="title function_">eq</span>(<span class="number">0</span>));</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> image.<span class="title function_">updateMask</span>(mask).<span class="title function_">divide</span>(<span class="number">10000</span>);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//Build the Sentinel 2 collection, filtered by date, bounds and percentage of cloud cover </span></span><br><span class="line"><span class="keyword">var</span> dataset = ee.<span class="title class_">ImageCollection</span>(<span class="string">&#x27;COPERNICUS/S2_SR&#x27;</span>)</span><br><span class="line">                  .<span class="title function_">filterDate</span>(<span class="string">&#x27;2019-01-01&#x27;</span>,<span class="string">&#x27;2020-12-31&#x27;</span>)</span><br><span class="line">                  .<span class="title function_">filterBounds</span>(aoi)</span><br><span class="line">                  .<span class="title function_">filter</span>(ee.<span class="property">Filter</span>.<span class="title function_">lt</span>(<span class="string">&#x27;CLOUDY_PIXEL_PERCENTAGE&#x27;</span>,<span class="number">10</span>))</span><br><span class="line">                  .<span class="title function_">map</span>(maskS2clouds);</span><br><span class="line"><span class="title function_">print</span>(<span class="string">&quot;Sentinel 2 Image Collection&quot;</span>,dataset);</span><br><span class="line"><span class="keyword">var</span> dem = ee.<span class="title class_">Image</span>(<span class="string">&quot;NASA/NASADEM_HGT/001&quot;</span>) <span class="comment">//添加dem数据 </span></span><br><span class="line"><span class="comment">// Construct Classfication Dataset</span></span><br><span class="line"><span class="comment">// RS Index Cacluate(NDVI\NDWI\EVI\BSI)</span></span><br><span class="line"><span class="keyword">var</span> add_RS_index = <span class="keyword">function</span>(<span class="params">img</span>)&#123;</span><br><span class="line">  <span class="keyword">var</span> ndvi = img.<span class="title function_">normalizedDifference</span>([<span class="string">&#x27;B8&#x27;</span>, <span class="string">&#x27;B4&#x27;</span>]).<span class="title function_">rename</span>(<span class="string">&#x27;NDVI&#x27;</span>).<span class="title function_">copyProperties</span>(img,[<span class="string">&#x27;system:time_start&#x27;</span>]);</span><br><span class="line">  <span class="keyword">var</span> ndwi = img.<span class="title function_">normalizedDifference</span>([<span class="string">&#x27;B3&#x27;</span>, <span class="string">&#x27;B8&#x27;</span>]).<span class="title function_">rename</span>(<span class="string">&#x27;NDWI&#x27;</span>).<span class="title function_">copyProperties</span>(img,[<span class="string">&#x27;system:time_start&#x27;</span>]);</span><br><span class="line">  <span class="keyword">var</span> evi = img.<span class="title function_">expression</span>(<span class="string">&#x27;2.5 * ((NIR - RED) / (NIR + 6 * RED - 7.5 * BLUE + 1))&#x27;</span>, </span><br><span class="line">  &#123;</span><br><span class="line">    <span class="string">&#x27;NIR&#x27;</span>: img.<span class="title function_">select</span>(<span class="string">&#x27;B8&#x27;</span>),</span><br><span class="line">    <span class="string">&#x27;RED&#x27;</span>: img.<span class="title function_">select</span>(<span class="string">&#x27;B4&#x27;</span>),</span><br><span class="line">    <span class="string">&#x27;BLUE&#x27;</span>: img.<span class="title function_">select</span>(<span class="string">&#x27;B2&#x27;</span>)</span><br><span class="line">  &#125;).<span class="title function_">rename</span>(<span class="string">&#x27;EVI&#x27;</span>).<span class="title function_">copyProperties</span>(img,[<span class="string">&#x27;system:time_start&#x27;</span>]);</span><br><span class="line">  <span class="keyword">var</span> bsi = img.<span class="title function_">expression</span>(<span class="string">&#x27;((RED + SWIR1) - (NIR + BLUE)) / ((RED + SWIR1) + (NIR + BLUE)) &#x27;</span>, </span><br><span class="line">  &#123;</span><br><span class="line">    <span class="string">&#x27;RED&#x27;</span>: img.<span class="title function_">select</span>(<span class="string">&#x27;B4&#x27;</span>), </span><br><span class="line">    <span class="string">&#x27;BLUE&#x27;</span>: img.<span class="title function_">select</span>(<span class="string">&#x27;B2&#x27;</span>),</span><br><span class="line">    <span class="string">&#x27;NIR&#x27;</span>: img.<span class="title function_">select</span>(<span class="string">&#x27;B8&#x27;</span>),</span><br><span class="line">    <span class="string">&#x27;SWIR1&#x27;</span>: img.<span class="title function_">select</span>(<span class="string">&#x27;B11&#x27;</span>),</span><br><span class="line"></span><br><span class="line">  &#125;).<span class="title function_">rename</span>(<span class="string">&#x27;BSI&#x27;</span>).<span class="title function_">copyProperties</span>(img,[<span class="string">&#x27;system:time_start&#x27;</span>]);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> ibi = img.<span class="title function_">expression</span>(<span class="string">&#x27;(2 * SWIR1 / (SWIR1 + NIR) - (NIR / (NIR + RED) + GREEN / (GREEN + SWIR1))) / (2 * SWIR1 / (SWIR1 + NIR) + (NIR / (NIR + RED) + GREEN / (GREEN + SWIR1)))&#x27;</span>, &#123;</span><br><span class="line">    <span class="string">&#x27;SWIR1&#x27;</span>: img.<span class="title function_">select</span>(<span class="string">&#x27;B11&#x27;</span>),</span><br><span class="line">    <span class="string">&#x27;NIR&#x27;</span>: img.<span class="title function_">select</span>(<span class="string">&#x27;B8&#x27;</span>),</span><br><span class="line">    <span class="string">&#x27;RED&#x27;</span>: img.<span class="title function_">select</span>(<span class="string">&#x27;B4&#x27;</span>),</span><br><span class="line">    <span class="string">&#x27;GREEN&#x27;</span>: img.<span class="title function_">select</span>(<span class="string">&#x27;B3&#x27;</span>)</span><br><span class="line">  &#125;).<span class="title function_">rename</span>(<span class="string">&#x27;IBI&#x27;</span>).<span class="title function_">copyProperties</span>(img,[<span class="string">&#x27;system:time_start&#x27;</span>]);</span><br><span class="line">  <span class="keyword">return</span> img.<span class="title function_">addBands</span>([ndvi, ndwi, evi, bsi, ibi]);</span><br><span class="line">&#125;;</span><br><span class="line"><span class="keyword">var</span> dataset = dataset.<span class="title function_">map</span>(add_RS_index); </span><br><span class="line"><span class="keyword">var</span> bands = [<span class="string">&#x27;B2&#x27;</span>,<span class="string">&#x27;B3&#x27;</span>,<span class="string">&#x27;B4&#x27;</span>,<span class="string">&#x27;B5&#x27;</span>,<span class="string">&#x27;B6&#x27;</span>,<span class="string">&#x27;B7&#x27;</span>,<span class="string">&#x27;B8&#x27;</span>,<span class="string">&#x27;B8A&#x27;</span>,<span class="string">&#x27;B11&#x27;</span>,<span class="string">&#x27;NDVI&#x27;</span>,<span class="string">&#x27;NDWI&#x27;</span>,<span class="string">&#x27;BSI&#x27;</span>];</span><br><span class="line"><span class="keyword">var</span> imgcol_median = dataset.<span class="title function_">select</span>(bands).<span class="title function_">median</span>(); <span class="comment">//获取日期范围内的像素中值，以以减小误差</span></span><br><span class="line"> </span><br><span class="line"><span class="keyword">var</span> aoi_dem = dem.<span class="title function_">select</span>(<span class="string">&#x27;elevation&#x27;</span>).<span class="title function_">clip</span>(aoi).<span class="title function_">rename</span>(<span class="string">&#x27;DEM&#x27;</span>);<span class="comment">//裁剪DEM</span></span><br><span class="line"><span class="keyword">var</span> construct_img = imgcol_median.<span class="title function_">addBands</span>(aoi_dem).<span class="title function_">clip</span>(aoi);</span><br><span class="line"><span class="comment">//分类样本</span></span><br><span class="line"><span class="keyword">var</span> train_points = cropland.<span class="title function_">merge</span>(grassland).<span class="title function_">merge</span>(city).<span class="title function_">merge</span>(forest).<span class="title function_">merge</span>(water);<span class="comment">//分类样本，可以加类 </span></span><br><span class="line"><span class="keyword">var</span> train_data= construct_img.<span class="title function_">sampleRegions</span>(&#123;</span><br><span class="line">  <span class="attr">collection</span>: train_points,</span><br><span class="line">  <span class="attr">properties</span>: [<span class="string">&#x27;landcover&#x27;</span>],</span><br><span class="line">  <span class="attr">scale</span>: <span class="number">10</span></span><br><span class="line">&#125;);</span><br><span class="line"><span class="comment">//精度评价</span></span><br><span class="line"><span class="keyword">var</span> withRandom = train_data.<span class="title function_">randomColumn</span>(<span class="string">&#x27;random&#x27;</span>);<span class="comment">//样本点随机的排列</span></span><br><span class="line"><span class="keyword">var</span> split = <span class="number">0.7</span>; </span><br><span class="line"><span class="keyword">var</span> trainingPartition = withRandom.<span class="title function_">filter</span>(ee.<span class="property">Filter</span>.<span class="title function_">lt</span>(<span class="string">&#x27;random&#x27;</span>, split));<span class="comment">//筛选70%的样本作为训练样本</span></span><br><span class="line"><span class="keyword">var</span> testingPartition = withRandom.<span class="title function_">filter</span>(ee.<span class="property">Filter</span>.<span class="title function_">gte</span>(<span class="string">&#x27;random&#x27;</span>, split));<span class="comment">//筛选30%的样本作为测试样本</span></span><br><span class="line"><span class="comment">//分类方法选择随机森林</span></span><br><span class="line"><span class="keyword">var</span> rf = ee.<span class="property">Classifier</span>.<span class="title function_">smileRandomForest</span>(&#123;</span><br><span class="line">  <span class="attr">numberOfTrees</span>: <span class="number">20</span>,  </span><br><span class="line">  <span class="attr">bagFraction</span>: <span class="number">0.8</span></span><br><span class="line">&#125;).<span class="title function_">train</span>(&#123;</span><br><span class="line">  <span class="attr">features</span>: train_data,</span><br><span class="line">  <span class="attr">classProperty</span>: <span class="string">&#x27;landcover&#x27;</span>,</span><br><span class="line">  <span class="comment">// inputProperties: inputbands</span></span><br><span class="line">&#125;);</span><br><span class="line"><span class="comment">//对哨兵数据进行随机森林分类</span></span><br><span class="line"><span class="keyword">var</span> img_classfication = construct_img.<span class="title function_">classify</span>(rf); </span><br><span class="line"><span class="comment">//运用测试样本分类，确定要进行函数运算的数据集以及函数</span></span><br><span class="line"><span class="keyword">var</span> test = testingPartition.<span class="title function_">classify</span>(rf);</span><br><span class="line"><span class="comment">//计算混淆矩阵</span></span><br><span class="line"><span class="keyword">var</span> confusionMatrix = test.<span class="title function_">errorMatrix</span>(<span class="string">&#x27;landcover&#x27;</span>, <span class="string">&#x27;classification&#x27;</span>);</span><br><span class="line"><span class="title function_">print</span>(<span class="string">&#x27;confusionMatrix&#x27;</span>,confusionMatrix);<span class="comment">//面板上显示混淆矩阵</span></span><br><span class="line"><span class="title function_">print</span>(<span class="string">&#x27;overall accuracy&#x27;</span>, confusionMatrix.<span class="title function_">accuracy</span>());<span class="comment">//面板上显示总体精度</span></span><br><span class="line"><span class="title function_">print</span>(<span class="string">&#x27;kappa accuracy&#x27;</span>, confusionMatrix.<span class="title function_">kappa</span>());<span class="comment">//面板上显示kappa值</span></span><br><span class="line"><span class="title class_">Map</span>.<span class="title function_">centerObject</span>(aoi)</span><br><span class="line"><span class="title class_">Map</span>.<span class="title function_">addLayer</span>(aoi);</span><br><span class="line"><span class="title class_">Map</span>.<span class="title function_">addLayer</span>(img_classfication.<span class="title function_">clip</span>(aoi), &#123;<span class="attr">min</span>: <span class="number">1</span>, <span class="attr">max</span>: <span class="number">4</span>, <span class="attr">palette</span>: [<span class="string">&#x27;orange&#x27;</span>, <span class="string">&#x27;blue&#x27;</span>, <span class="string">&#x27;green&#x27;</span>,<span class="string">&#x27;yellow&#x27;</span>]&#125;);</span><br><span class="line"><span class="keyword">var</span> class1=img_classfication.<span class="title function_">clip</span>(aoi)</span><br><span class="line"><span class="comment">//导出分类图</span></span><br><span class="line"><span class="title class_">Export</span>.<span class="property">image</span>.<span class="title function_">toDrive</span>(&#123;  </span><br><span class="line">       <span class="attr">image</span>: class1,  </span><br><span class="line">       <span class="attr">description</span>: <span class="string">&#x27;rfclass&#x27;</span>,  </span><br><span class="line">       <span class="attr">fileNamePrefix</span>: <span class="string">&#x27;rf&#x27;</span>,  <span class="comment">//文件命名</span></span><br><span class="line">       <span class="attr">folder</span>: <span class="string">&quot;class&quot;</span>,  <span class="comment">//保存的文件夹</span></span><br><span class="line">       <span class="attr">scale</span>: <span class="number">10</span>,  <span class="comment">//分辨率</span></span><br><span class="line">       <span class="attr">region</span>: aoi,  <span class="comment">//研究区</span></span><br><span class="line">       <span class="attr">maxPixels</span>: <span class="number">1e13</span>,  <span class="comment">//最大像元素，默认就好</span></span><br><span class="line">       <span class="attr">crs</span>: <span class="string">&quot;EPSG:4326&quot;</span>  <span class="comment">//设置投影</span></span><br><span class="line">   &#125;);  </span><br></pre></td></tr></table></figure>



<h1 id="结果分析"><a href="#结果分析" class="headerlink" title="结果分析"></a>结果分析</h1><h2 id="结果图展示"><a href="#结果图展示" class="headerlink" title="结果图展示"></a>结果图展示</h2><p><img src="https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/loading3.gif" data-original="https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/GEE%E9%81%A5%E6%84%9F%E5%BD%B1%E5%83%8F%E7%9B%91%E7%9D%A3%E5%88%86%E7%B1%BB/%E5%88%86%E7%B1%BB%E7%BB%93%E6%9E%9C.png" alt="随机森林分类结果"></p>
<h2 id="混淆矩阵"><a href="#混淆矩阵" class="headerlink" title="混淆矩阵"></a>混淆矩阵</h2><h2 id="KAPPA系数"><a href="#KAPPA系数" class="headerlink" title="KAPPA系数"></a>KAPPA系数</h2><h1 id="结语"><a href="#结语" class="headerlink" title="结语"></a>结语</h1><p>遥感数据本身就不该局限于个人电脑配置软件处理能力，大数据就应当为科学研究，工程项目等服务全人类的事业作出贡献，而不是固步自封，费用昂贵，阻碍科技的进步与生活的无限可能。未来的世界应当是一个大数据时代，数据共享时代，科研与应用相结合的时代。科技的进步需要所有人的共同努力，科技本身不是为个人制造利益的，而是为大众服务。我们之所以努力地推动科技的进步，就是希望每个人都能活得更有尊严，这才应是科研者和技术人所应有的本心。</p>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:guojiaxiang0820@gmail.com" rel="external nofollow noreferrer">洛沐</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://www.guojxblog.cn/archives/1abb07a6.html">https://www.guojxblog.cn/archives/1abb07a6.html</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" rel="external nofollow noreferrer" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://www.guojxblog.cn" target="_blank">洛沐の人间客栈</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/%E9%81%A5%E6%84%9F%E5%BD%B1%E5%83%8F%E5%88%86%E7%B1%BB/">遥感影像分类</a></div><div class="post_share"><div class="social-share" data-image="https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/bg_beauty.jpg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js" defer></script></div></div><div class="post-reward"><div class="reward-button"><i class="fas fa-qrcode"></i> 打赏</div><div class="reward-main"><ul class="reward-all"><li class="reward-item"><a href="https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/wechat.jpeg" rel="external nofollow noreferrer" target="_blank"><img class="post-qr-code-img" src="https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/loading3.gif" data-original="https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/wechat.jpeg" alt="微信"/></a><div class="post-qr-code-desc">微信</div></li><li class="reward-item"><a href="https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/alipay.jpeg" rel="external nofollow noreferrer" target="_blank"><img class="post-qr-code-img" src="https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/loading3.gif" data-original="https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/alipay.jpeg" alt="支付宝"/></a><div class="post-qr-code-desc">支付宝</div></li></ul></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/archives/a1db3116.html"><img class="prev-cover" src="https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/loading3.gif" data-original="https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/movies.jpeg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">肖申克的救赎——经久不衰的经典之作</div></div></a></div><div class="next-post pull-right"><a href="/archives/fe82aeb3.html"><img class="next-cover" src="https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/loading3.gif" data-original="https://luomublog.oss-cn-qingdao.aliyuncs.com/ImgHost/handbyhand.jpeg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">Python类中self的作用</div></div></a></div></nav><hr/><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div></div><div class="comment-wrap"><div><div id="lv-container" data-id="city" data-uid="MTAyMC81NjIzOS8zMjcwMg=="></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content is-expand"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%BC%95%E8%A8%80"><span class="toc-number">1.</span> <span class="toc-text">引言</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%86%99%E6%9C%AC%E6%96%87%E7%9A%84%E5%88%9D%E8%A1%B7"><span class="toc-number">1.1.</span> <span class="toc-text">写本文的初衷</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%A7%A3%E5%86%B3%E4%BA%86%E4%BB%80%E4%B9%88%E9%97%AE%E9%A2%98"><span class="toc-number">1.2.</span> <span class="toc-text">解决了什么问题</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#GEE%E7%9A%84%E4%BC%98%E5%8A%BF"><span class="toc-number">1.3.</span> <span class="toc-text">GEE的优势</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E6%95%B0%E6%8D%AE%E6%BA%90%E4%B8%8E%E9%A2%84%E5%A4%84%E7%90%86"><span class="toc-number">2.</span> <span class="toc-text">数据源与预处理</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#GEE-SR%E6%95%B0%E6%8D%AE%E9%9B%86%E4%BB%8B%E7%BB%8D"><span class="toc-number">2.1.</span> <span class="toc-text">GEE SR数据集介绍</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%A0%94%E7%A9%B6%E5%8C%BA%E5%9F%9F"><span class="toc-number">2.2.</span> <span class="toc-text">研究区域</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%93%A8%E5%85%B5-2%E5%8F%B7%E6%95%B0%E6%8D%AE"><span class="toc-number">2.3.</span> <span class="toc-text">哨兵-2号数据</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E6%96%B9%E6%B3%95%E5%8E%9F%E7%90%86"><span class="toc-number">3.</span> <span class="toc-text">方法原理</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%BE%90%E5%B0%84%E6%A0%A1%E6%AD%A3"><span class="toc-number">3.1.</span> <span class="toc-text">辐射校正</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%9C%B0%E7%90%86%E6%A0%A1%E6%AD%A3"><span class="toc-number">3.2.</span> <span class="toc-text">地理校正</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E2%80%94%E2%80%94%E9%9A%8F%E6%9C%BA%E6%A3%AE%E6%9E%97%E7%AE%97%E6%B3%95%E6%A8%A1%E5%9E%8B"><span class="toc-number">3.3.</span> <span class="toc-text">机器学习——随机森林算法模型</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%85%B6%E4%BB%96%E6%A8%A1%E5%9E%8B"><span class="toc-number">3.4.</span> <span class="toc-text">其他模型</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#GEE%E4%B8%AD%E7%9A%84%E5%88%86%E7%B1%BB%E5%99%A8%E4%B8%8E%E5%88%86%E7%B1%BB%E6%96%B9%E6%B3%95%E8%AF%A6%E8%A7%A3%EF%BC%88%E4%BB%A3%E7%A0%81%E4%B8%8E%E5%88%86%E6%9E%90%E6%96%B9%E6%B3%95%EF%BC%89"><span class="toc-number">4.</span> <span class="toc-text">GEE中的分类器与分类方法详解（代码与分析方法）</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#JavaScript%E5%9F%BA%E7%A1%80"><span class="toc-number">4.1.</span> <span class="toc-text">JavaScript基础</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%BB%A3%E7%A0%81%E4%B8%8E%E6%96%B9%E6%B3%95%E8%AF%A6%E8%A7%A3"><span class="toc-number">4.2.</span> <span class="toc-text">代码与方法详解</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E7%BB%93%E6%9E%9C%E5%88%86%E6%9E%90"><span class="toc-number">5.</span> <span class="toc-text">结果分析</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%BB%93%E6%9E%9C%E5%9B%BE%E5%B1%95%E7%A4%BA"><span class="toc-number">5.1.</span> <span class="toc-text">结果图展示</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%B7%B7%E6%B7%86%E7%9F%A9%E9%98%B5"><span class="toc-number">5.2.</span> <span class="toc-text">混淆矩阵</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#KAPPA%E7%B3%BB%E6%95%B0"><span class="toc-number">5.3.</span> <span class="toc-text">KAPPA系数</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E7%BB%93%E8%AF%AD"><span class="toc-number">6.</span> <span class="toc-text">结语</span></a></li></ol></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2021 - 2023  <i id="heartbeat" class="fa fas fa-heartbeat"></i> 洛沐</div><div class="footer_custom_text">谢谢你来看<a href="https://www.guojxblog.cn/" style='color:red;Font-size:36'>我</a>，你今天真好看😘</div></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/HCLonely/images@master/others/heartbeat.min.css"></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="translateLink" type="button" title="简繁转换">簡</button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><a id="to_comment" href="#post-comment" title="直达评论"><i class="fas fa-comments"></i></a><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">本地搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div id="local-search-results"></div></div></div><div id="search-mask"></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="/js/tw_cn.js"></script><script src="https://cdn.jsdelivr.net/npm/medium-zoom/dist/medium-zoom.min.js"></script><script src="https://cdn.jsdelivr.net/npm/instant.page/instantpage.min.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.js"></script><script>function panguFn () {
  if (typeof pangu === 'object') pangu.autoSpacingPage()
  else {
    getScript('https://cdn.jsdelivr.net/npm/pangu/dist/browser/pangu.min.js')
      .then(() => {
        pangu.autoSpacingPage()
      })
  }
}

function panguInit () {
  if (false){
    GLOBAL_CONFIG_SITE.isPost && panguFn()
  } else {
    panguFn()
  }
}

document.addEventListener('DOMContentLoaded', panguInit)</script><script src="/js/search/local-search.js"></script><div class="js-pjax"><script>function loadLivere () {
  if (typeof LivereTower === 'object') {
    window.LivereTower.init()
  }
  else {
    (function(d, s) {
        var j, e = d.getElementsByTagName(s)[0];
        if (typeof LivereTower === 'function') { return; }
        j = d.createElement(s);
        j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
        j.async = true;
        e.parentNode.insertBefore(j, e);
    })(document, 'script');
  }
}

if ('Livere' === 'Livere' || !true) {
  if (true) btf.loadComment(document.getElementById('lv-container'), loadLivere)
  else loadLivere()
}
else {
  function loadOtherComment () {
    loadLivere()
  }
}</script></div><script src="/js/mobile_side.js"></script><script id="click-heart" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/click-heart.min.js" async="async" mobile="true"></script><div class="pjax-reload"><script async="async">var arr = document.getElementsByClassName('recent-post-item');
for(var i = 0;i<arr.length;i++){
    arr[i].classList.add('wow');
    arr[i].classList.add('animate__zoomIn');
    arr[i].setAttribute('data-wow-duration', '1s');
    arr[i].setAttribute('data-wow-delay', '700ms');
    arr[i].setAttribute('data-wow-offset', '100');
    arr[i].setAttribute('data-wow-iteration', '1');
}</script><script async="async">var arr = document.getElementsByClassName('card-widget');
for(var i = 0;i<arr.length;i++){
    arr[i].classList.add('wow');
    arr[i].classList.add('animate__zoomIn');
    arr[i].setAttribute('data-wow-duration', '');
    arr[i].setAttribute('data-wow-delay', '');
    arr[i].setAttribute('data-wow-offset', '');
    arr[i].setAttribute('data-wow-iteration', '');
}</script></div><script defer="defer" src="https://cdn.jsdelivr.net/gh/graingert/wow@1.3.0/dist/wow.min.js"></script><script defer="defer" src="/js/wow_init.js"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div><script>
            window.imageLazyLoadSetting = {
                isSPA: true,
                preloadRatio: 3,
                processImages: null,
            };
        </script><script>window.addEventListener("load",function(){var t=/\.(gif|jpg|jpeg|tiff|png)$/i,r=/^data:image\/[a-z]+;base64,/;Array.prototype.slice.call(document.querySelectorAll("img[data-original]")).forEach(function(a){var e=a.parentNode;"A"===e.tagName&&(e.href.match(t)||e.href.match(r))&&(e.href=a.dataset.original)})});</script><script>!function(n){n.imageLazyLoadSetting.processImages=o;var e=n.imageLazyLoadSetting.isSPA,i=n.imageLazyLoadSetting.preloadRatio||1,r=Array.prototype.slice.call(document.querySelectorAll("img[data-original]"));function o(){e&&(r=Array.prototype.slice.call(document.querySelectorAll("img[data-original]")));for(var t,a=0;a<r.length;a++)0<=(t=(t=r[a]).getBoundingClientRect()).bottom&&0<=t.left&&t.top<=(n.innerHeight*i||document.documentElement.clientHeight*i)&&function(){var t,e,n,i,o=r[a];t=o,e=function(){r=r.filter(function(t){return o!==t})},n=new Image,i=t.getAttribute("data-original"),n.onload=function(){t.src=i,e&&e()},t.src!==i&&(n.src=i)}()}o(),n.addEventListener("scroll",function(){var t,e;t=o,e=n,clearTimeout(t.tId),t.tId=setTimeout(function(){t.call(e)},500)})}(this);</script><script async>window.onload=function(){var a=document.createElement('script'),b=document.getElementsByTagName('script')[0];a.type='text/javascript',a.async=!0,a.src='/sw-register.js?v='+Date.now(),b.parentNode.insertBefore(a,b)};</script></body></html>